package yxk.list.approve;

import kd.bos.entity.datamodel.ListSelectedRow;
import kd.bos.entity.datamodel.ListSelectedRowCollection;
import kd.bos.form.control.events.ItemClickEvent;
import kd.bos.form.events.HyperLinkClickArgs;
import kd.bos.form.events.HyperLinkClickEvent;
import kd.bos.list.BillList;
import kd.bos.list.IListView;
import kd.bos.list.plugin.AbstractListPlugin;
import yxk.utils.ConutFieldsUtil;

import java.util.Iterator;

/**
 * 移动端薪资发放审批，需展示总薪资、净薪资、总人数
 */
public class SubmitBillListPlugin  extends AbstractListPlugin {

    @Override
    public void itemClick(ItemClickEvent evt) {
        super.itemClick(evt);
        String itemKey = evt.getItemKey();
        if("tblsubmit".equals(itemKey)){
            ListSelectedRowCollection selectedRows = ((IListView) this.getView()).getSelectedRows();
            Iterator<ListSelectedRow> rows = selectedRows.iterator();
            while (rows.hasNext()) {
                ListSelectedRow row = rows.next();
                ConutFieldsUtil conutFieldsUtil = new ConutFieldsUtil();
                conutFieldsUtil.beforeDoOperation(row.getBillNo());
            }
        }
    }
}
